﻿@model Developer.Entity.Books
@{
    Layout = "/Areas/Admin/Views/Shared/_PopLayout.cshtml";
}
<link href="~/Assets/Plugs/HUI/webuploader/0.1.5/webuploader.css" rel="stylesheet" />
<article class="page-container">
    @*<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="sf_batdel('/admin/advertise/batdelete')" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a><a href="javascript:;" onclick="sf_show('添加广告位', '/admin/advertise/Edit', '', '420',true)" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加广告</a> </span> <span class="r">共有数据：<strong>@ViewBag.itemCount</strong> 条</span> </div>*@
    <form class="form form-horizontal" id="form-admin-add" action="/admin/mybook/edit" method="post">
        <input hidden="" value="@Model.Id" id="id" name="companyId" />
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">书名：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.Name" placeholder="" id="coordinate" name="name">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">书名拼音首字母：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.PY" placeholder="例：《简爱》，则输入 ja" id="coordinate" name="py">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">作者：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.Author" placeholder="" id="coordinate" name="author">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">ISBN：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.ISBN" placeholder="" id="coordinate" name="ISBN">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">简介：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.Description" placeholder="" id="coordinate" name="description">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">书本价格：单位（元）</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.OriginPrice" placeholder="填写数字，精确到小数点两位" id="coordinate" name="originprice">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">预定价格：单位（元）</label>
            <div class="formControls col-xs-8 col-sm-10">
                <input type="text" class="input-text" value="@Model.OrderPrice" placeholder="填写数字，精确到小数点两位" id="coordinate" name="description">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">类型：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <select name="type">
                    <option>无</option>
                @{ 
                    var type = Developer.Service.BookTypeService.GetAll().Where(a => a.IsAbort == false);
                    foreach(var item in type)
                    {
                        <option value="@item.Id">@item.Name</option>
                    }
                }

                </select>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2">图书封面：</label>
            <div class="formControls col-xs-8 col-sm-10">
                <div class="uploader-list-container">
                    <div class="queueList">
                        <div id="dndArea" class="placeholder">
                            <div id="filePicker-2"></div>
                            <p>请上传封面，图片为png或jpg、jpeg，不超过1MB</p>
                            <input type="hidden" name="coverimg" value="@Model.CoverImg" id="uploaderImg" />
                        </div>
                    </div>
                    <div class="statusBar" style="display:none">
                        <div class="progress"><span class="text">0%</span><span class="percentage"></span> </div>
                        <div class="info"></div>
                        <div class="btns">
                            <div class="filePicker2"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-5 col-xs-offset-4 col-sm-offset-5">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;保存&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>

<script src="~/Assets/Scripts/jquery-1.8.2.min.js"></script>
<script src="~/Assets/Plugs/HUI/webuploader/0.1.5/webuploader.min.js"></script>
<script src="~/Assets/Scripts/js.js"></script>
<script type="text/javascript">
    init_uploader(1);

</script>